<template>
	<view>
		<u-sticky offset-top="0">
			<navBarView title="添加律师" :statusBarHeight="statusBarHeight"></navBarView>
		</u-sticky>
		<view class="searchView flex-row-flex-start">
			<view class="searchLeft flex-row-flex-start">
				<image class="icon" src="/pageE/static/lawOffice_search.png"></image>
				<input class="msgStr" placeholder="请输入"/>
			</view>
			<view class="searchBtn">
				搜索
			</view>
		</view>
		<view @click="chooseIndexClick(index)" :style="index==chooseIndex?'background: rgba(233,53,72,0.08);':'background: #FFFFFF;'" class="listItem flex-row-space-between" v-for="index in 10" :key="index">
			<view class="listItem1 flex-row-flex-start">
				<image class="listItem1a"></image>
				<view class="listItem1b">
					<view class="listItem1b1">
						张主任
					</view>
					<view class="listItem1b2">
						18888888888
					</view>
				</view>
			</view>
			<view class="listItem2 flex-column-flex-end">
				
			</view>
		</view>
		
		<view style="height: 190rpx;"></view>
		<view v-if="chooseIndex != 99999" class="fixed-bottom flex-row-center" style="height: 180rpx;background-color: white;">
			<view @click="sureAddClick()" class="loginButton2">
				确定添加
			</view>
		</view>
	</view>
</template>

<script>

	export default {
		
		onShow() {
			let sysInfo = uni.getSystemInfoSync()
			this.statusBarHeight = sysInfo.statusBarHeight; // 状态栏高度
			this.criminalTypeViewTopHeight = 88+15; // case tyep 距离顶部高度
		},
		data() {
			return {
				statusBarHeight: '',// 状态栏高度 
				chooseIndex:99999
			}
		},
		methods: {
			chooseIndexClick(index){
				if (index==this.chooseIndex) {
					this.chooseIndex = 99999
				} else{
					this.chooseIndex = index
				}
			},
			sureAddClick(){
				uni.showToast({
					title:'此律师已绑定其他律所',
					icon:'none'
				})
				uni.showToast({
					title:'添加成功',
					icon:'none'
				})
			}
		}
	}
</script>

<style>
	.listItem1b2{
		margin-top: 14rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
	}
	.listItem1b1{
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;
	}
	.listItem1b{
		margin-left: 28rpx;
	}
	.listItem1a{
		width: 104rpx;
		height: 104rpx;
		border-radius: 52rpx;
		background-color: #E93548;
	}
	.listItem{
		/* margin-left: 24rpx; */
		margin-top: 24rpx;
		width: 702rpx;
		padding-left: 24rpx;
		padding-right: 24rpx;
		padding-top: 32rpx;
		padding-bottom: 32rpx;
	}
	.loginButton2 {
		margin-top: 10rpx;
		margin-left: 64rpx;
		width: 620rpx;
		height: 90rpx;
		background: linear-gradient( to bottom, #E93548 0%, #F35B43 100%);
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(235,43,59,0.4);
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #FFFFFF;
		line-height: 90rpx;
		text-align: center;
	}
	.searchBtn{
		margin-left: 16rpx;
	}
	.msgStr{
		margin-left: 14rpx;
		width: 530rpx;
	}
	.icon{
		margin-left: 22rpx;
		width: 32rpx;
		height: 32rpx;
	}
	.searchLeft{
		margin-left: 24rpx;
		width: 612rpx;
		height: 80rpx;
		background: #F5F5F5;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}
	.searchView{
		width: 750rpx;
		height: 128rpx;
	}
</style>
